﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RenderStereoscopicLayer.cs" company="ScRePt">
//   Copyright © ScRePt 2010 - 2012
// </copyright>
// <summary>
//   The render stereoscopic layer.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MP3D.Calibration
{
    #region Using Directives

    using MediaPortal.GUI.Library;

    #endregion

    /// <summary>
    /// The render stereoscopic layer.
    /// </summary>
    public class RenderStereoscopicLayer : IRenderLayer
    {
        #region Delegates

        /// <summary>
        /// The render layer requested handler.
        /// </summary>
        /// <param name="layer">
        /// The layer.
        /// </param>
        /// <param name="timePassed">
        /// The time passed.
        /// </param>
        public delegate void RenderLayerRequestedHandler(IRenderLayer layer, float timePassed);

        #endregion

        #region Events

        /// <summary>
        /// The render layer requested.
        /// </summary>
        public event RenderLayerRequestedHandler RenderLayerRequested;

        #endregion

        #region Properties

        /// <summary>
        /// The base class.
        /// </summary>
        public IRenderLayer BaseClass { get; set; }

        #endregion

        #region Implemented Interfaces

        #region IRenderLayer

        /// <summary>
        /// The render layer.
        /// </summary>
        /// <param name="timePassed">
        /// The time passed.
        /// </param>
        public void RenderLayer(float timePassed)
        {
            if (this.RenderLayerRequested != null)
            {
                this.RenderLayerRequested(this.BaseClass, timePassed);
            }
        }

        /// <summary>
        /// The should render layer.
        /// </summary>
        /// <returns>
        /// The should render layer.
        /// </returns>
        public bool ShouldRenderLayer()
        {
            return this.BaseClass.ShouldRenderLayer();
        }

        #endregion

        #endregion
    }
}